<div id="loginHeader">
  <g:isNotLoggedIn>
    <g:link controller="register" action="index">Register</g:link>
     | 
    <g:link controller="login" action="index">login</g:link>
  </g:isNotLoggedIn>
  <g:isLoggedIn>
    [<g:loggedInUserInfo field="username"/>]<g:link controller="logout" action="index">logout</g:link>
  </g:isLoggedIn>
</div>